package com.example.peibei.service.presenter;

import com.dingtao.common.core.DataCall;
import com.dingtao.common.core.WDPresenter;
import com.dingtao.common.core.http.IAppRequest;

import io.reactivex.Observable;

/**
 * @author dingtao
 * @date 2018/12/28 11:23
 * qq:1940870847
 */
public class GiveUpPresenter extends WDPresenter<IAppRequest> {

    public GiveUpPresenter(DataCall dataCall) {
        super(dataCall);
    }

    @Override
    protected Observable getModel(Object... args) {
        boolean isDianZan = (Boolean) args[0];
        if (!isDianZan) {
            return iRequest.giveUp((String) args[1], (String) args[2]);
        } else {
            return iRequest.cancelFollow((String) args[1], (String) args[2]);
        }
    }


}
